﻿<UserControl x:Class="Opds_Viewer.View.HomeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             DataContext="{Binding Home, Mode=OneWay, Source={StaticResource Locator}}">
    <Grid>
        <StackPanel>
        <TextBlock TextWrapping="Wrap" Text="Catalogs' list : "/>
        <ListBox ItemsSource="{Binding OCatalogs}" SelectedItem="{Binding SelectedCatalog, Mode=TwoWay}"
                 ItemTemplate="{DynamicResource CatalogDataTemplate}"
                 Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Margin="0,20,0,0" HorizontalAlignment="Left" />
            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                <Button Content="Add" Command="{Binding AddCatalogCommand}" Style="{DynamicResource WhiteButton}" />
                <Button Content="Consult" Command="{Binding ConsultCatalogCommand}" Style="{DynamicResource WhiteButton}" />
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
